<?php
namespace Admin\Controller;
use Think\Controller;
class CommonController extends  Controller{
    public function __construct(){
        parent::__construct();
        $cookie=cookie('username');
        if (!isset($cookie)) {
            $this ->error('.请先登陆...',U('Login/login'));
        }
    }
}